//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { WechatopenMiniappUsers, WechatopenMiniappUsersResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooWechatopenMiniappUsersList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<WechatopenMiniappUsersResponse>(`/uctoo/wechatopen_miniapp_users/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooWechatopenMiniappUsers = async (id: string) => {
  return requestClient.get<WechatopenMiniappUsers>(`/uctoo/wechatopen_miniapp_users/${id}`);
};

export const adductooWechatopenMiniappUsers = async (data: Partial<WechatopenMiniappUsers>) => {
  return requestClient.post<WechatopenMiniappUsers>('/uctoo/wechatopen_miniapp_users/add', data);
};

export const edituctooWechatopenMiniappUsers = async (data: Partial<WechatopenMiniappUsers>) => {
  return requestClient.post<WechatopenMiniappUsers>('/uctoo/wechatopen_miniapp_users/edit', data);
};

export const deleteuctooWechatopenMiniappUsers = async (id: string) => {
  return requestClient.post<any>('/uctoo/wechatopen_miniapp_users/del', { id });
};
